﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using FD.RemoteAssistant.Core;
using FDRemoteAssistant2.Manager;

namespace FDRemoteAssistant2
{
    /*
     * CreatedOn: 2018-05-15
     * CreatedBy: Jackie Lee(天宇遊龍)
     */
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            RuntimeContext.Current.Register(new DefaultContainer(Assembly.GetEntryAssembly()
                .GetReferencedAssemblies().Where(a => a.Name.StartsWith("FD")),
                Assembly.GetEntryAssembly()));
            RuntimeContext.Current.Container.Register();
            FDHelper.Current.Load();

            Application.Run(new FormMain());

        }
    }
}
